<template>
		<view class="goodsItems">
			<view class="goodsItem" v-for="item in hotGoods" :key='item.objectId' @click="gotoDetail(item.objectId)">
				<image :src="item.goodsImgUrl"></image>
				<view class="price">
					<text>￥{{item.nowPrice}}</text>
					<text>￥{{item.oldPrice}}</text>
				</view>
				<view class="name">
					{{item.introGoods}}
				</view>
			</view>
		</view>
</template>


<script>
	export default{
		data(){
			return {
				
			}
		},
		methods:{
			gotoDetail(id){
				// console.log("我是商品列表点击时间")
				this.$emit("gotoD",id)
			}
		},
		props:["hotGoods"]
	}
</script>

<style lang="scss">
	.goodsItems {
		padding: 0 10rpx;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
	
		.goodsItem {
			background: #FFFFFF;
			width: 355rpx;
			margin: 10rpx 0;
			padding: 15rpx;
			box-sizing: border-box;
	
			image {
				width: 80%;
				height: 150px;
				display: block;
				margin: 0 auto;
			}
	
			.price {
				color: $my-uni;
				font-size: 36rpx;
				margin: 15rpx 0;
	
				text:nth-child(2) {
					color: #C0C0C0;
					font-size: 28rpx;
					margin-left: 12rpx;
					text-decoration: line-through;
				}
	
			}
	
			.name {
				font-size: 28rpx;
				line-height: 50rpx;
				padding-bottom: 15rpx;
				padding-top: 10rpx;
			}
		}
	}
</style>
